package com.aegis.manage.service.auth.app;

import com.aegis.common.mybatis.base.IBaseService;
import com.aegis.common.mybatis.model.PageResult;
import com.aegis.manage.api.dto.SysApiPermissionDTO;
import com.aegis.manage.api.request.*;
import com.aegis.manage.api.vo.AppDetailVO;
import com.aegis.manage.api.vo.AppGroupVO;
import com.aegis.manage.api.vo.AppInfoVO;
import com.aegis.manage.api.vo.GenerateAppVO;
import com.aegis.manage.model.dos.AuthApp;

import java.util.List;

/**
 * @Author wuweixin
 *
 * @Version 1.0
 * @Descritube
 */
public interface AuthAppService extends IBaseService<AuthApp> {

    /**
     * @param appId
     * @return
     */
    AuthApp selectAppByAppId(String appId);


    /**
     * @return
     */
    List<AuthApp> selectAllApps();

    /**
     * @param appId
     * @return
     */
    List<SysApiPermissionDTO> selectAppApiPermissions(String appId);

    /**
     * @param appId
     * @return
     */
    List<SysApiPermissionDTO> selectAppApiGroupPermissions(String appId);


    /**
     * @param request
     * @return
     */
    GenerateAppVO generateApp(GenerateAppRequest request);

    /**
     * @param request
     */
    void updateApp(UpdateAppRequest request);


    /**
     * 查询应用分页信息
     *
     * @param request
     * @return
     */
    PageResult<AppInfoVO> queryAppInfoPage(QueryAppInfoPageRequest request);


    /**
     * @param id
     * @return
     */
    AppDetailVO selectAppDetailById(String id);


    /**
     * 删除应用
     *
     * @param id
     */
    void delAppById(String id);

    /**
     *
     * @param request
     * @return
     */
    PageResult<AppGroupVO> queryAppGroupPage(QueryAppGroupPageRequest request);


    /**
     *
     * @param request
     */
    void bindAppGroup(BindAppGroupRequest request);

    /**
     *
     * @param id
     */
    void delBindGroup(String id);

}
